package s47.dqj.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import s47.dqj.bean.DepartmentLogin;
import s47.dqj.dao.DepartmentLoginDaoInf;

@Service("departmentLoginServiceImpl")
public class DepartmentLoginServiceImpl implements DepartmentLoginServiceInf {
	
	@Resource(name="departmentLoginDaoImpl")
	private DepartmentLoginDaoInf departmentLoginDao;
	private DepartmentLogin temp;
	
	public DepartmentLogin getTemp() {
		return temp;
	}

	public void setTemp(DepartmentLogin temp) {
		this.temp = temp;
	}

	public DepartmentLoginDaoInf getDepartmentLoginDao() {
		return departmentLoginDao;
	}

	public void setDepartmentLoginDao(DepartmentLoginDaoInf departmentLoginDao) {
		this.departmentLoginDao = departmentLoginDao;
	}
	/**
	 * 根据条件查找想要的科室人员登录表DepartmentLogin
	 * @param hql
	 * @param pageNum
	 * @return
	 */
	public  List<DepartmentLogin> findAllByCondition(String hql,
			Integer pageNum){
		return departmentLoginDao.findAllByCondition(hql, pageNum);
	}

	/**
	 * 获取页数(对查找想要的DepartmentPositionCost记录分页)
	 * @return
	 */
	public List<Integer> selectPageTotal(String tempHQL){
		return departmentLoginDao.selectPageTotal(tempHQL);
	}

	/**
	 * 新增一个登录账号
	 * @param departmentLogin
	 */
	public void save(DepartmentLogin departmentLogin){
		departmentLoginDao.save(departmentLogin);
	}

	/**
	 * 修改登录账号资料
	 * @param departmentLogin
	 */
	public void update(DepartmentLogin departmentLogin){
		departmentLoginDao.update(departmentLogin);
	}

	/**
	 * 删除某个登录账号资料
	 * @param departmentLogin
	 */
	public void delete(DepartmentLogin departmentLogin){
		departmentLoginDao.delete(departmentLogin);
	}

	/**
	 * 根据id获取某个登录账号资料
	 * @param departmentLogin
	 * @return
	 */
	public DepartmentLogin findObject(DepartmentLogin departmentLogin){
		return departmentLoginDao.findObject(departmentLogin);
	}
	
	
	/* (non-Javadoc)
	 * @see s47.dqj.service.DepartmentLoginServiceInf#findLogin(s47.dqj.bean.DepartmentLogin)
	 */
	@Override
	public DepartmentLogin findLogin(DepartmentLogin departmentLogin){
		return departmentLoginDao.findLogin(departmentLogin);		
	}
	
	
}
